package com.efesco.service.compensation;

import com.bstek.dorado.common.*;
import com.bstek.dorado.data.*;
import com.bstek.dorado.view.*;
import com.bstek.dorado.view.data.*;
import com.bstek.dorado.view.control.*;
import com.efesco.common.CommUtil;
import com.efesco.system.User;

/**
 * V_single_company_apply_queryViewModel
 */
public class V_single_company_apply_queryViewModel extends DefaultViewModel {
  protected void initControls()
      throws Exception {
    super.initControls();
	DoradoContext context = DoradoContext.getContext();
	User user = (User) context.getAttribute(context.SESSION, "User");

    if(user.isCommonCompanyUser()){
    	 ViewField field=(ViewField)this.getDataset("dataset_select").getField("COMPANY_CHINESE_NAME");
    	 field.setVisible(false);
    	this.getDataset("dataset_select").insertRecord();
    	this.getDataset("dataset_select").setValue("single_company_id",user.getSingleCompanyId());
        //this.getDataset("dataset_select") 	
    	
    }
    }
	protected void doLoadData() throws Exception {
		// Add your code here
		super.doLoadData();
	}
}
